<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Ajax Framework - <span class="subitem">Fragment</span>
    </ui:define>

    <ui:define name="description">
        Fragment component is used to define automatically partially process and update sections whenever
        ajax request is triggered by a descandant component. In this example, required input field outside the fragment is ignored and
        only the contents of the fragment are processed-updated automatically on button click since
        button is inside the fragment. Fragment makes it easy to define partial ajax process and update without explicitly
        defining component identifiers.
    </ui:define>

    <ui:param name="documentationLink" value="/components/fragment" />

    <ui:define name="implementation">

        <h:form>
            <h:panelGrid columns="2" cellpadding="5">
                <p:outputLabel for="ignored" value="Required" />
                <p:inputText id="ignored" required="true" />
            </h:panelGrid>

            <p:fragment>
                <p:autoUpdate />
                <h:panelGrid columns="4" cellpadding="5">
                    <p:outputLabel for="txt" value="Text Value:" />
                    <p:inputText id="txt" value="#{basicView.text}" />
                    <p:commandButton value="Submit"/>
                    <h:outputText value="#{basicView.text}" />
                </h:panelGrid>
            </p:fragment>
        </h:form>

    </ui:define>

</ui:composition>